import React, { memo } from 'react';
import { connect } from 'react-redux';

function Header(props) {
  const { numA, numB } = props;

  return (
    <div>
      <p>Header</p>
      <div>ComA num: <b>{numA}</b></div>
      <div>ComB num: <b>{numB}</b></div>
    </div>
  )
}

const mapStateToProps = state => ({
  numA: state.comAReducer,
  numB: state.comBReducer,
})

export default connect(mapStateToProps, null)(memo(Header));

